import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:sports_new/resources/styles.dart';
import 'package:sports_new/view/home/news_list_view.dart';

import '../../widgets/base/qkd_text.dart';

class NewsListPage extends StatefulWidget {
  const NewsListPage({super.key});

  @override
  State<NewsListPage> createState() => _NewsListPageState();
}

class _NewsListPageState extends State<NewsListPage> {
  final id = Get.arguments;
  late String title;
  @override
  void initState() {
    super.initState();
    title = Get.parameters['title'] ?? '';
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: Styles.appBar(title: QkdText(title)),
      body: NewsListView(id: id),
    );
  }
}
